Skip to content

[16.0][IMP] lighting: add spare parts tab on product form#95

Merged
eantones merged 2 commits into16.0from
16.0-imp-add_spare_tab_on_product
Apr 22, 2026
Merged

[16.0][IMP] lighting: add spare parts tab on product form#95
eantones merged 2 commits into16.0from
16.0-imp-add_spare_tab_on_product

Conversation

@deeniiz
Copy link
Copy Markdown
Collaborator

@deeniiz deeniiz commented Apr 16, 2026

No description provided.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2026

Codecov Report

❌ Patch coverage is 36.00000% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.57%. Comparing base (ccf32ca) to head (7b2c180).
⚠️ Report is 5 commits behind head on 16.0.

Files with missing lines Patch % Lines
lighting/models/product.py 36.00% 16 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             16.0      #95      +/-   ##
==========================================
- Coverage   43.60%   43.57%   -0.04%     
==========================================
  Files         283      283              
  Lines        8104     8128      +24     
  Branches     1564     1569       +5     
==========================================
+ Hits         3534     3542       +8     
- Misses       4475     4491      +16     
  Partials       95       95              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@deeniiz deeniiz force-pushed the 16.0-imp-add_spare_tab_on_product branch from 8c0c35b to 9f2619d Compare April 16, 2026 14:44
@deeniiz deeniiz requested a review from eantones April 21, 2026 15:14
@eantones eantones force-pushed the 16.0-imp-add_spare_tab_on_product branch from 9f2619d to 3ff01f2 Compare April 22, 2026 08:15
- product.py: rewrite _compute_is_spare_part with raw SQL to avoid
  N+1 queries on large recordsets (matches the pattern already used
  by _compute_is_optional_accessory).
- product.py: add parent_spare_part_product_count computed field
  (raw-SQL compute) so the reverse lookup "which products list this
  record as a spare part" is available, matching the existing
  optional/required accessory pattern.
- product.py: extend _check_product_dependency to forbid a product
  being its own spare part.
- views/product_views.xml: add product_action_parent_spare_part_product
  action window and a stat button on the product form, matching the
  existing P. rec. acc. / P. mand. acc. buttons.
- i18n/pt.po: fix translation reference syntax (double underscore on
  field refs, model_terms: on view arch refs) so the Portuguese
  translations actually load in Odoo 16.
@eantones eantones merged commit ec84011 into 16.0 Apr 22, 2026
4 of 6 checks passed
@eantones eantones deleted the 16.0-imp-add_spare_tab_on_product branch April 22, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants